package com.yqz.sys.mapper;

import com.yqz.common.base.mapper.BaseMapper;
import com.yqz.sys.form.CompPermissionForm;
import com.yqz.sys.query.CompPermissionQuery;
import com.yqz.sys.vo.CompPermissionVO;
import com.yqz.sys.vo.CompUserRoleRefVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CompPermissionMapper extends BaseMapper<CompPermissionVO, CompPermissionQuery, CompPermissionForm> {

    List<CompPermissionVO> selectRolesPermission(@Param("roles") List<CompUserRoleRefVO> roles);

    List<Integer> findAllIdByPId(@Param("pIds") List<Integer> pIds);

    void deleteRoleRefByPId(@Param("pIds") List<Integer> pIds);

    void batchDeleteByPId(@Param("pIds") List<Integer> pIds);

    List<Integer> findPIdByRId(@Param("rId") Integer rId, @Param("compId") Integer compId);
}